// import Cookies from 'js-cookie'

const state = {
  w: document.documentElement.clientWidth, //窗口宽度
  h: document.documentElement.clientHeight, //窗口高度
}

const mutations = {
  SET_W: (state, w) => {
    state.w = w
  },
  SET_H: (state, h) => {
    state.h = h
  },
  SET_WH: (state, data) => {
    state.w = data.w
    state.h = data.h
  },
}

const actions = {
  setSize({ commit }, size) {
    commit('SET_SIZE', size)
  },
}

export default {
  namespaced: true,
  state,
  mutations,
  actions
}
